Information processing apparatus

ABSTRACT

According to an embodiment, an information processing apparatus includes a plurality of cores, a shared resource that can be shared by the plurality of cores, and local registers that store configuration information peculiar to the respective cores. The shared resource is provided independently from the plurality of cores. The local registers are provided to the respective cores. This makes it possible to provide an information processing apparatus that can suppress increase in hardware resources even when the number of cores composing a multi-core system increases.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. application Ser. No.14/052,138, filed on Oct. 11, 2013, which claims benefit of priorityfrom the prior Japanese Application No. 2012-229907, filed on Oct. 17,2012; the entire contents of all of which are incorporated herein byreference.

BACKGROUND

The present invention relates to an information processing apparatus,and for example, relates to an information processing apparatusincluding a plurality of cores.

A multi-core system is known that includes a plurality of cores in asingle information processing apparatus to improve processing capabilityof the whole information processing apparatus. For example, in amulti-core system, one program is divided into a plurality of threads,and the plurality of cores respectively execute the plurality of threadsto thereby improve the processing speed of the program.

Japanese Unexamined Patent Application Publication No. 2009-251967discloses a technique for allowing dynamical change of access authorityof the cores to memory protected areas while maintaining high security.

SUMMARY

In a multi-core system with a plurality of cores provided inside asingle information processing apparatus, it is necessary to provide, ineach of the cores, a hardware resource such as a register and a memoryprotection unit (MPU) for machine configuration and virtualizationconfiguration. For this reason, the present inventor has found a problemthat the more the number of cores composing a multi-core system, themore the hardware resources inside the multi-core system, therebyincreasing the chip area and the cost.

Other issues and new features will be apparent from the description andattached drawings of the present invention.

An aspect of the present invention is an information processingapparatus that includes a plurality of cores, a shared resource that canbe shared by the plurality of cores, and a local register that storesconfiguration information peculiar to each of the plurality of cores.The shared resource is provided independently from the plurality ofcores, and the local register is provided to each of the plurality ofcores.

According to the above aspect, it is possible to provide an informationprocessing apparatus that is capable of suppressing increase in hardwareresources even when the number of cores composing a multi-core systemincreases.

BRIEF DESCRIPTION OF THE DRAWINGS

The above and other aspects, advantages and features will be moreapparent from the following description of certain embodiments taken inconjunction with the accompanying drawings, in which:

FIG. 1 is a block diagram showing an information processing apparatusaccording to a first embodiment;

FIG. 2 is a block diagram showing shared register control units #1 and#2 and a shared register #0 that are included in the informationprocessing apparatus according to the first embodiment;

FIG. 3 is a block diagram showing MPU control units #1 and #2 and amemory protection unit MPU #0 that are included in an informationprocessing apparatus according to a second embodiment;

FIG. 4 is a diagram showing an example of a protected area configurationregister included in the memory protection unit MPU #0;

FIG. 5 is a flowchart for explaining an operation of the informationprocessing apparatus according to the second embodiment;

FIG. 6 is a flowchart for explaining an operation of the informationprocessing apparatus according to the second embodiment;

FIG. 7 is a block diagram showing MPU control units #1 and #2 and amemory protection unit MPU #0 that are included in the informationprocessing apparatus according to a third embodiment;

FIG. 8 is a flowchart for explaining an operation of the informationprocessing apparatus according to the third embodiment;

FIG. 9 is a flowchart for explaining an operation of the informationprocessing apparatus according to the third embodiment;

FIG. 10 is a block diagram showing MPU control units #1 and #2 and amemory protection unit MPU #0 that are included in the informationprocessing apparatus according to a fourth embodiment;

FIG. 11 is a flowchart for explaining an operation of the informationprocessing apparatus according to the fourth embodiment; and

FIG. 12 is a flowchart for explaining an operation of the informationprocessing apparatus according to the fourth embodiment.

DETAILED DESCRIPTION First Embodiment

FIG. 1 is a block diagram showing an information processing apparatusaccording to a first embodiment. The information processing apparatus 1shown in FIG. 1 includes a core #1 (10), a core #2 (20), a sharedresource #0 (30), a shared memory 32, an exclusive control unit 34, anda peripheral module 35.

The core #1 (10) includes a processing unit #1 (11) that performscalculation processing in the core #1 (10). The processing unit #1 (11)includes a CPU (Central Processing Unit) #1, a shared register controlunit #1 (12), an MPU control unit #1 (13), and a register #1 (a localregister) 14. An internal bus A_#1 is provided in the processing unit#1. The CPU #1, the shared register control unit #1 (12), the MPUcontrol unit #1 (13), and the register #1 (14) are mutually connectedvia the internal bus A_#1.

Note that the configuration of the core #2 (20) is basically the same asthat of the core #1 (10), thus the repeated explanation shall not beprovided here. For example, the CPU #1, the shared register control unit#1 (12), the MPU control unit #1 (13) and the register #1 (14) in theprocessing unit #1 (11) of the core #1 (10) respectively correspond to aCPU #2, a processing unit #2 (21), a shared register control unit #2(22), an MPU control unit #2 (23), and a register #2 (a local register)24 in the processing unit #2 (21) of the core #2 (20).

The CPU #1 is a circuit for executing a predetermined program and is acalculation circuit operating as a main processor in the processing unit#1 (11).

The CPU #1 is connected to an interrupt controller INTC #1. Theinterrupt controller INTC #1 receives, from a peripheral circuitprovided outside the information processing apparatus 1, an interruptrequest via an interrupt interface (IF) #1 and outputs an interruptsignal to the CPU #1.

The CPU #1 is also connected to a cache memory #1. Data that is usedhighly frequently by the CPU #1 is accumulated in the cache memory #1.The operation of the core #1 (10) can be accelerated when the CPU #1(10) accesses the cache memory #1 and reads the data.

Moreover, the internal bus A_#1 of the processing unit #1 (11) isconnected to a system bus interface (IF) #1 via a bus B_#1. The systembus IF #1 is connected to a system bus 31 that is provided outside thecore #1 (10). Similarly, in the core #2 (20), an internal bus A_#2 ofthe processing unit #2 (21) is connected to a system bus IF #2 via a busB_#2. The system bus IF #2 is connected to the system bus 31 that isprovided outside the core #2 (20). The shared memory 32, for example, isconnected to the system bus 31. The core #1 (10) and the core #2 (20)share the shared memory 32.

The CPU #1 can read data from the shared memory 32 and write data to theshared memory 32 via the internal bus A_#1, the bus B_#1, the system busIF #1, and the system bus 31. Similarly, the CPU #2 can read data fromthe shared memory 32 and write data to the shared memory 32 via theinternal bus A_#2, the bus B_#2, the system bus IF #2, and the systembus 31.

The internal bus A_#1 of the processing unit #1 (11) is also connectedto a peripheral interface (IF) #1 via the bus B_#1. The peripheral IF #1is connected to a peripheral bus 33 provided outside the core #1 (10).Similarly, in the core #2 (20), the internal bus A_#2 of the processingunit #2 (21) is connected to a peripheral IF #2 via the bus B_#2. Theperipheral IF #2 is connected to the peripheral bus 33 provided outsidethe core #2 (20). The exclusive control unit 34 and the peripheralmodule 35, for example, are connected to the peripheral bus 33.

Here, the exclusive control unit 34 is a circuit for restricting, whenone of the core #1 (10) and the core #2 (20) is accessing the sharedresource #0 or the shared memory 32, the other core from accessing theshared resource #0 or the shared memory 32. For example, when the core#1 (10) is accessing the shared resource #0, the exclusive control unit34 prohibits the core #2 (20) from accessing the shared resource #0.

The shared resource #0 (30) is a resource that can be shared by the core#1 (10) and the core #2 (20) and includes, for example, a sharedregister #0 (50) and a memory protection unit MPU #0 (60). Here, theshared resource #0 (30) is provided independently from the core #1 (10)and the core #2 (20).

The shared register #0 (50) is a register for storing configurationinformation that can be shared by the core #1 (10) and the core #2 (20)and includes, for example as shown in FIG. 2, a machine configurationregister #0 (51) and a virtualization configuration register #0 (52).The machine configuration register #0 (51) stores architectureinformation that is followed by the whole machine including the core #1(10) and the core #2 (20). The architecture information is informationrelating to a machine ID, compatibility mode setting, exceptionoccurrence setting, etc. The virtualization configuration register #0(52) stores configuration information in the case of using the machineincluding the core #1 (10) and the core #2 (20) as a virtual machine.The configuration information in the case of using the machine includingthe core #1 (10) and the core #2 (20) as a virtual machine here isconfiguration information relating to a hypervisor privilege such as ahypervisor call branch target address and a hypervisor call table size.

The shared register control unit #1 (12), which controls writing andreading to and from the shared register #0 (50) by the core #1 (10), isprovided in the processing unit #1 (11) of the core #1 (10). Similarly,the shared register control unit #2 (22), which controls writing andreading to and from the shared register #0 (50) by the core #2 (20), isprovided in the processing unit #2 (21) of the core #2 (20).

As shown in FIG. 2, for example when the CPU #1 of the core #1 (10)writes a setting value to the shared register #0 (50), the CPU #1outputs a write command to the shared register control unit #1 (12) viathe internal bus A_#1. In response to the write command, the sharedregister control unit #1 (12) outputs a write control signal and a writevalue (a setting value) to the shared register #0 (50). When the writecontrol signal is supplied, the shared register #0 (50) stores the writevalue (the setting value) to a predetermined register.

Further, for example when the CPU #1 of the core #1 (10) reads a settingvalue from the shared register #0 (50), the CPU #1 outputs a readcommand to the shared register control unit #1 (12) via the internal busA_#1. In response to the read command, the shared register control unit#1 (12) outputs a read control signal to the shared register #0 (50).When the read control signal is supplied, the shared register #0 (50)reads a read value (a setting value) from the predetermined register andoutputs the read value (the setting value) to the shared registercontrol unit #1 (12). Then, the shared register control unit #1 (12)outputs the read value (the setting value) to the CPU #1 via theinternal bus A_#1.

Note that the above-mentioned processing is performed in the core #2(20) when the CPU #2 writes a setting value to the shared register #0(50) or reads a setting value from the shared register #0 (50).Moreover, a configuration may be employed in which important informationstored to the shared register #0 (50), for example, is written only by acore with master authority (e.g., the core #1 (10)).

The memory protection unit MPU #0 (60) shown in FIG. 1 is a circuit forprotecting the shared memory 32 from invalid access by the core #1 (10)and the core #2 (20). For example, when the CPU #1 accesses the sharedmemory 32, the memory protection unit MPU #0 (60) evaluates whether ornot the CPU #1 is allowed to access the shared memory 32 based on memoryaccess information including a memory address output from the CPU #1.When the memory protection unit MPU #0 (60) evaluates that the access isallowed, the CPU #1 accesses the shared memory 32.

Here, the memory protection unit MPU #0 (60) can be used when the core#1 (10) and the core #2 (20) access any other shared circuits than theshared memory 32, for example when the core #1 (10) and the core #2 (20)access the peripheral module 35. Explained below is an example when thememory protection unit MPU #0 (60) protects the shared memory 32.

FIG. 1 shows an example in which the shared memory 32 is connected tothe system bus 31. However, for example, a memory (e.g., an SRAM and aflash memory) connected to the CPU #1 or a memory (e.g., an SRAM and aflash memory) connected to the CPU #2 may be used as the shared memory.

The MPU control unit #1 (13), which controls access to the memoryprotection unit MPU #0 (60) by the core #1 (10), is provided in theprocessing unit #1 of the core #1 (10). Similarly, the MPU control unit#2 (23), which controls access to the memory protection unit MPU #0 (60)by the core #2 (20), is provided in the processing unit #2 of the core#2 (20). Note that the MPU control unit #1 (13), the MPU control unit #2(23), and the memory protection unit MPU #0 (60) are explained in detailin a second embodiment.

The register #1 (14) that stores configuration information peculiar tothe core #1 (10) is provided in the processing unit #1 (11) of the core#1 (10). The configuration information peculiar to the core #1 (10) is,for example, ID information of the CPU #1 and configuration informationof the cache memory #1. Similarly, the register #2 (24) that storesconfiguration information peculiar to the core #2 (20) is provided inthe operation unit #2 (21) of the core #2 (20).

In related arts, it has been necessary, in a multi-core system includinga plurality of cores inside a single information processing apparatus,to provide a hardware resource such as a register and a memoryprotection unit for machine configuration and virtualizationconfiguration in each of the cores. Accordingly, there has been aproblem in which the more the number of cores composing a multi-coresystem, the more hardware resources provided inside the multi-coresystem, thereby increasing the chip area and the cost.

To that end, in the information processing apparatus 1 according to thisembodiment, the shared resource #0 (30) that can be shared by the core#1 (10) and the core #2 (20) composing a multi-core system is providedindependently from the core #1 (10) and the core #2 (20). Further, theregister #1 (14) that stores the configuration information peculiar tothe core #1 (10) is provided in the core #1 (10), and the register #2(24) that stores the configuration information peculiar to the core #2(20) is provided in the core #2 (20).

As described above, in the information processing apparatus according tothis embodiment, the registers storing the configuration informationpeculiar to the respective cores remain inside the respective cores, andthe shared resource that can be shared by both cores is provided outsidethe cores to allow sharing. With such a configuration, it is possible tosimplify a circuit configuration of the cores and suppress increase inhardware resources even when the number of the cores composing themulti-core system increases. This therefore suppresses increase in thechip area of the information processing apparatus and increase in thecost.

Second Embodiment

Next, a second embodiment is explained. In this embodiment, detailedexplanation is given for the MPU control unit #1 (13), the MPU controlunit #2 (23), and the memory protection unit MPU #0 (60) that areincluded in the information processing apparatus explained in the firstembodiment. Note that other configuration is the same as the informationprocessing apparatus explained in the first embodiment, thus the samecomponents are denoted by the same reference numerals, and the repeatedexplanation shall not be provided here.

FIG. 3 is a block diagram showing the MPU control unit #1 (13), the MPUcontrol unit #2 (23), and the memory protection unit MPU #0 (60)included in the information processing apparatus according to thisembodiment. The memory protection unit MPU #0 (60) includes an arbiter61 and protected area configuration registers #1 to #m (first protectedarea configuration registers), access evaluation circuits #1 to #m(first access evaluation circuits), and an evaluation signal generationcircuit #0. Here, m is an integer of two or greater.

The MPU control unit #1 (13) included in the core #1 (10) outputs, tothe arbiter 61 of the memory protection unit MPU #0 (60), for examplememory access information ACC_M_1 that is output from the CPU #1 whenthe CPU #1 accesses the shared memory 32. The MPU control unit #1 (13)also outputs a notification signal ACK_1 to the CPU #1.

Similarly, the MPU control unit #2 (23) included in the core #2 (20)outputs, to the arbiter 61 of the memory protection unit MPU #0 (60),for example memory access information ACC_M_2 that is output from theCPU #2 when the CPU #2 accesses the shared memory 32. The MPU controlunit #2 (23) also outputs a notification signal ACK_2 to the CPU #2.

The arbiter 61 included in the memory protection unit MPU #0 (60)arbitrates evaluation of whether or not the core #1 (10) is allowed toaccess the shared memory 32 and evaluation of whether or not the core #2(20) is allowed to access the shared memory 32. That is, when there isconflict between an evaluation request from the MPU control unit #1 (13)and an evaluation request from the MPU control unit #2 (23), the arbiter61 arbitrates those evaluation requests.

Specifically, when there is conflict between the memory accessinformation ACC_M_1 output from the MPU control unit #1 (13) and thememory access information ACC_M_2 output from the MPU control unit #2(23), the arbiter 61 arbitrates the memory access information ACC_M_1and ACC_M_2 and outputs one of the memory access information ACC_M_n(n=1 or 2) to the access evaluation circuits #1 to #m. Moreover, thearbiter 61 outputs an evaluation signal OUT_n to one of the MPU controlunits 13 and 23 corresponding to the selected memory access informationACC_M_n. That is, when the arbiter 61 selects the memory accessinformation ACC_M_1, the arbiter 61 outputs, to the MPU control unit #1(13), an evaluation signal OUT_1 output from the evaluation signalgeneration circuit #0. On the other hand, when the arbiter 61 selectsthe memory access information ACC_M_2, the arbiter 61 outputs, to theMPU control unit #2 (23), an evaluation signal OUT 2 output from theevaluation signal generation circuit #0.

Here, the memory access information ACC_M_n includes, for example, amemory address, information relating to a type of access to the sharedmemory 32 (write access or read access), and information relating to anaccess width (byte/halfword/full word).

The protected area configuration registers #1 to #m store protected areainformation relating to protected areas of the shared memory 32. Thatis, the protected area configuration registers #1 to #m store addressinformation corresponding to memory areas of the shared memory 32 andauthority information (attribute information) relating to authority ofeach core to access the memory areas of the shared memory 32.

FIG. 4 is a diagram showing an example of the protected areaconfiguration registers #1 to #m included in the memory protection unitMPU #0 (60). As shown in FIG. 4, the protected area configurationregisters #1 to #m respectively include upper limit address registers(MPUA1 to MPUAm), lower limit address registers (MPLA1 to MPLAm), andattribute registers (MPAT1 to MPATm).

The upper limit address registers (MPUA1 to MPUAm) are registers thatstore upper limit addresses of respective memory areas #1 to #m. Thelower limit address registers (MPLA1 to MPLAm) are registers that storelower limit addresses of the respective memory areas #1 to #m. Each ofthe memory areas #1 to #m corresponds to memory areas of entries #1 to#m. For example, when the memory area #1 is set as the memory area ofthe entry #1, the upper limit address of the memory area #1 is stored tothe upper limit address register MPUA1 of the protected areaconfiguration register #1, and the lower limit address of the memoryarea #1 is stored to the lower limit address register MPLA1. At thistime, the memory areas #1 to #m of the shared memory 32, i.e., thememory areas of the entries #1 to #m, may be configured not to overlapwith each other or may be configured to overlap with each other.

Note that the memory areas #1 to #m may be specified using the lowerlimit addresses and the sizes of the memory areas instead of using theupper limit addresses and the lower limit addresses as above. In thiscase, lower limit address registers and area size registers areprovided, for example.

The attribute registers (MPAT1 to MPATm) are registers that storeattributes (e.g., allow/prohibit writing, allow/prohibit reading, andallow/prohibit execution) of the memory areas #1 to #m (the entries #1to #m). The attribute registers (MPAT1 to MPATm) may also store the IDinformation. The ID information is core ID information corresponding toeach core and group ID information that groups a plurality of cores, forexample. When the core ID information is stored to the attributeregister, for instance, evaluation of access to the shared memory 32 canbe performed on each core.

As shown in FIG. 3, the access evaluation circuits #1 to #m are providedto correspond to the protected area configuration register #1 to #m,respectively. In other words, the protected area configuration registers#1 to #m and the access evaluation circuits #1 to #m are provided tocorrespond to the entries #1 to #m, respectively. The access evaluationcircuits #1 to #m evaluate whether or not the core #1 (10) and the core#2 (20) are allowed to access the shared memory 32 based on the memoryaccess information ACC_M_n, which is output from the core #1 (10) andthe core #2 (20), and the protected area information, which is stored tothe protected area configuration registers #1 to #m.

That is, when a memory address included in the memory access informationACC_M_n is included in the memory areas stored to the protected areaconfiguration registers #1 to #m, and further, when the core #1 (10) andthe core #2 (20) have access authority to the memory area 32, the accessevaluation circuits #1 to #m evaluate that the core #1 (10) and the core#2 (20) are allowed to access the shared memory 32.

For example, when a memory address ADD_M_1 included in the memory accessinformation ACC_M_1 output from the core #1 (10) is included in thememory area #1 stored to the protected area configuration register #1,the access evaluation circuit #1 evaluates that the memory addressADD_M_1 is included in the entry #1. That is, when the memory addressADD_M_1 is within the range between the upper limit address register(MPUA1) and the lower limit address register (MPLA1), the areaevaluation circuit #1 evaluates that the memory address ADD_M_1 isincluded in the entry #1.

Further, when a type of access to the shared memory 32 (i.e., write,read, execute etc.) by the core #1 (10) is allowed, the accessevaluation circuit #1 allows the core #1 (10) to access the sharedmemory 32. Here, the case in which a type of access is allowed is thecase in which a type of access to the shared memory 32 by the core #1(10) is allowed in the attribute register (MPAT1).

The evaluation signal generation circuit #0 generates an evaluationsignal OUT_n based on an evaluation result output from the accessevaluation circuits #1 to #m and outputs the generated evaluation signalOUT_n to the arbiter 61. That is, when any of the access evaluationcircuits #1 to #m evaluates that access to the shared memory 32 isallowed, the evaluation signal generation circuit #0 outputs theevaluation signal OUT_n indicating access allowed to the shared memory32. On the other hand, when all of the access evaluation circuits #1 to#m evaluate that access to the shared memory 32 is prohibited, theevaluation signal generation circuit #0 outputs the evaluation signalOUT_n indicating access prohibited to the shared memory 32. Note thatwhen the memory areas of the entries #1 to #m are configured to overlapwith each other, a plurality of the access evaluation circuits #1 to #mmay evaluate that access is allowed.

When the evaluation signal OUT_1 output from the arbiter 61 indicatesthat access is allowed, the MPU control unit #1 (13) outputs an accessallowed notification signal to the CPU #1 as the notification signalACK_1. After that, the CPU #1 accesses the shared memory 32. Meanwhile,when the evaluation signal OUT_1 indicates that the access isprohibited, the MPU control unit #1 (13) outputs an exceptionnotification signal to the CPU #1 as the notification signal ACK_1. Inthis case, access to the shared memory 32 by the CPU #1 is prohibited.Note that the MPU control unit #2 (23) operates in a similar manner asabove.

Next, an operation of the information processing apparatus according tothis embodiment is explained using flowcharts shown in FIGS. 5 and 6.Explained below is a case in which the CPU #1 included in the core #1(10) accesses the shared memory 32 as an example.

When the CPU #1 accesses the shared memory 32, the CPU #1 outputs thememory access information ACC_M_1 to the MPU control unit #1 (13) (StepS1). Then, the MPU control unit #1 (13) outputs the memory accessinformation ACC_M_1 to the arbiter 61 (Step S2). When there is conflictbetween evaluation of whether or not the core #1 (10) is allowed toaccess the shared memory 32 and evaluation of whether or not the core #2(20) is allowed to access the shared memory 32, the arbiter 61arbitrates these evaluation requests. After arbitration by the arbiter61, the arbiter 61 outputs the memory access information ACC_M_1 to theaccess evaluation circuits #1 to #m (Step S3). After that, the accessevaluation circuits #1 to #m each perform access evaluation and outputevaluation results to the evaluation signal generation circuit #0 (StepS4).

Access evaluation is explained in detail using the flowchart shown inFIG. 6. In access evaluation, the access evaluation circuits #1 to #mperform access evaluation based on the protected area configurationregisters #1 to #m and the memory access information ACC_M_1 (Step S11).That is, the access evaluation circuits #1 to #m evaluate whether or notthe memory address ADD_M_1 included in the memory access informationACC_M_1 is included in the respective entries #1 to #m (i.e., the memoryareas #1 to #m that are stored to the protected area configurationregisters #1 to #m). Then, when the memory address ADD_M_1 is notincluded in the entries #1 to #m (Step S12: No), the access evaluationcircuits #1 to #m output, to the evaluation signal generation circuit#0, evaluation results indicating that access is prohibited (Step S15).

Meanwhile, when the memory address ADD_M_1 is included in the entries #1to #m (Step S12: Yes), and further, a type of access to the sharedmemory 32 by the CPU #1 is allowed (Step S13: Yes), the accessevaluation circuits #1 to #m output, to the evaluation signal generationcircuit #0, evaluation results indicating that the access is allowed(Step S14). Here, the case in which a type of access to the sharedmemory 32 by the CPU #1 is allowed is the case in which a type of accessto the shared memory 32 by the CPU #1 is allowed in the attributeregisters of the protected area configuration registers #1 to #m, forexample.

Moreover, when the memory address ADD_M_1 is included in the entries #1to #m (Step S12: Yes), and further, when a type of access to the sharedmemory 32 by the CPU #1 is not allowed (Step S13: No), the accessevaluation circuits #1 to #m output, to the evaluation signal generationcircuit #0, evaluation results indicating that the access is prohibited(Step S15).

Each of the access evaluation circuits #1 to #m performs accessevaluation in this way. After the access evaluation, the evaluationsignal generation circuit #0 outputs the evaluation signal OUT_1 to thearbiter 61 (Step S5). The arbiter 61 outputs the evaluation signal OUT_1to the MPU control unit #1 (13) (Step S6). When the evaluation signalOUT_1 indicates that the access is allowed (Step S7: Yes), the MPUcontrol unit #1 (13) outputs the access allowed notification signal tothe CPU #1 as the notification signal ACK_1. After that, the CPU #1accesses the shared memory 32 (Step S8). On the other hand, when theevaluation signal OUT_1 indicates that the access is prohibited (StepS8: No), the MPU control unit #1 (13) outputs the exception notificationsignal to the CPU #1 as the notification signal ACK_1 (Step S9). In thiscase, access to the shared memory 32 by the CPU #1 is prohibited.

The memory protection unit is a circuit with a large circuit area amongthe circuits included in each core. Especially when there are manyentries (e.g., m=16), the circuit area occupying in each core increasesand power consumption during the access evaluation also increases. Inother words, as memory protection evaluation must be performed for everymemory access, the more the number of entries, the larger the powerconsumption. For this reason, there has been a problem that when thenumber of cores composing a multi-core system increases, the circuitarea and power consumption also increases accordingly. This problem isespecially prominent in memory protection units.

In the information processing apparatus according to this embodiment,the core #1 (10) and the core #2 (20) share the memory protection unitMPU #0 (60). With such a configuration, it is possible to simplify acircuit configuration of the cores and suppress increase in hardwareresources even when the number of the cores composing a multi-coresystem increases.

Specifically, as the memory protection unit is shared, the number ofentries included in the memory protection unit can be made small for thewhole information processing apparatus, thereby reducing powerconsumption of the whole information processing apparatus. For example,when there are two cores composing a multi-core system and the number ofentries m of the memory protection unit is 16, if a memory protectionunit is provided to each core, the number of entries for the wholeinformation processing apparatus will be 32 (=16+16). However, when thecores share a memory protection unit, the number of entries for thewhole information processing apparatus will be 16, thereby reducing thepower consumption approximately by half.

As the information processing apparatus, there are, for example, amicroprocessor used for a personal computer and the like and amicrocontroller with specialized functions in controlling electronicdevices to be mounted. The microprocessor handles a large-capacitymemory. Thus, the microprocessor is often equipped with a memorymanagement unit (MMU) that includes a memory protection function and anaddress conversion function as a memory protection mechanism.

Meanwhile, as the functions of the microcontroller are specialized incontrolling electronic devices to be mounted, it is not necessary tomount a large-capacity memory and the address conversion function forconverting a virtual address into a physical address. Moreover, themicrocontroller is requested to reduce power consumption and its area.For this reason, when the memory management unit (MMU) is mounted as thememory protection mechanism of the microcontroller, overhead of hardwareresources will be large.

In addition, the microcontroller is used for control of electronicdevices, thus real-time property is important. However, when the memorymanagement unit (MMU) is mounted as the memory protection mechanism ofthe microcontroller, table walk occurs upon a TLB miss, thereby takingtime for processing and losing the real-time property.

Therefore, it is preferable to use a memory protection unit (MPU) notincluding the address conversion function as the memory protectionmechanism of the microcontroller than to use an MMU including theaddress conversion function. Accordingly, the information processingapparatus according to this embodiment is especially suited for amicrocontroller where reduced power, a smaller area, and real-timeproperty is valued.

Note that the information processing apparatus according to thisembodiment does not hinder application to an information processingapparatus including the memory protection unit equipped with the addressconversion function and can be applied to a microprocessor equipped withthe memory management unit (MMU) including the address conversionfunction, for example. Further, the information processing apparatusaccording to this embodiment can also be applied to the microprocessornot requiring the address conversion function, for example.

Third Embodiment

Next, a third embodiment is explained. FIG. 7 is a block diagram showingan MPU control unit #1 (13′), an MPU control unit #2 (23′), and a memoryprotection unit MPU #0 (60′) that are included in an informationprocessing apparatus according to this embodiment. In this embodiment,as shown in FIG. 7, a difference from the information processingapparatus explained in the second embodiment is that the MPU controlunit #1 (13′) and the MPU control unit #1 (23′) respectively include alocal MPU #1 (71) and a local MPU #2 (72). Other configuration is thesame as the information processing apparatus explained in the first andsecond embodiment.

As shown in FIG. 7, the MPU control unit #1 (13′) includes the local MPU#1 (71). The local MPU #1 (71) includes an address register #1,protected area configuration registers #1_1 to #1_p (second protectedarea configuration registers), access evaluation circuits #1_1 to #1_p(second access evaluation circuits), an evaluation signal generationcircuit #1, and a rewrite control circuit #1. Here, p is an integer of1≦p<m. The address register #1 is a register for temporarily holdingmemory access information ACC_M_1 supplied to the MPU control unit #1(13′).

The protected area configuration registers #1_1 to #1_p store protectedarea information relating to protected areas of the shared memory 32.That is, the protected area configuration registers #1_1 to #1_p storeaddress information corresponding to memory areas of the shared memory32 and authority information relating to authority of the core #1 (10)to access the memory areas of the shared memory 32. Note that theprotected area configuration registers #1_1 to #1_p have the sameconfiguration as the protected area configuration registers #1 to #m(see FIG. 4) explained in the second embodiment, thus the repeatedexplanation shall not be provided here.

The access evaluation circuits #1_1-#1_p are provided to correspond tothe protected area configuration registers #1_1 to #1_p, respectively.In other words, the protected area configuration registers #1_1 to #1_pand the access evaluation circuit #1_1 to #1_p are provided tocorrespond to entries #1_1 to #1_p, respectively. The access evaluationcircuits #1_1 to #1_p evaluate whether or not the core #1 (10) isallowed to access the shared memory 32 based on the memory accessinformation ACC_M_1, which is output from the address register #1 (i.e.,is output from the CPU #1), and the protected area information, which isstored to the protected area configuration registers #1_1 to #1_p.

That is, when a memory address included in the memory access informationACC_M_1 is included in the memory areas stored to the protected areaconfiguration registers #1_1 to #1_p, and further, when the core #1 (10)has access authority to the memory area 32, the access evaluationcircuits #1_1 to #1_p evaluate that the core #1 (10) is allowed toaccess the shared memory 32.

The evaluation signal generation circuit #1 outputs an evaluation signalOUT_M_1 to the MPU control unit #1 (13′) or the memory address ADD_M_1to an arbiter 61′.

That is, when the memory address ADD_M_1 results in a hit, and further,the core #1 (10) is evaluated to have access authority to the memoryarea 32, the evaluation signal generation circuit #1 generates theevaluation signal OUT_M_1 indicating access allowed and outputs thegenerated evaluation signal OUT_M_1 to the MPU control unit #1 (13′).The case in which the memory address ADD_M_1 results in a hit is thecase in which any of the access evaluation circuits #1_1 to #1_pevaluates that the memory address ADD_M_1 included in the memory accessinformation ACC_M_1 is included in the memory areas stored to theprotected area configuration register #1_1 to #1_p.

Meanwhile, when the memory address ADD_M_1 results in a hit, andfurther, the core #1 (10) is evaluated to have no access authority tothe memory area 32, the evaluation signal generation circuit #1generates the evaluation signal OUT_M_1 indicating access prohibited andoutputs the generated evaluation signal OUT_M_1 to the MPU control unit#1 (13′). Note that when overlapping of the memory areas is allowed forthe entries #1_1 to #1_p, it is necessary to perform access evaluationon other entries of the memory protection unit MPU #0 (60′). Thus, theevaluation signal generation circuit #1 will not output the evaluationsignal OUT_M_1 to the MPU control unit #1 (13′) and outputs the memoryaddress ADD_M_1 to the arbiter 61′.

On the other hand, when the memory address ADD_M_1 did not result in ahit, the evaluation signal generation circuit #1 outputs the memoryaddress ADD_M_1 to the arbiter 61′. The case in which the memory addressADD_M_1 did not result in a hit is the case in which all the accessevaluation circuits #1_1 to #1_p evaluate that the memory addressADD_M_1 included in the memory access information ACC_M_1 is notincluded in the memory areas stored to the protected area configurationregisters #1_1 to #1_p.

The rewrite control circuit #1 calculates an address hit rate of eachaccess evaluation circuits #1_1 to #1_p based on evaluation resultsoutput from the access evaluation circuit #1_1 to #1_p. Here, theaddress hit rate is a probability that the memory address ADD_M_1included in the memory access information ACC_M_1 is included in thememory areas stored to the protected area configuration registers #1_1to #1_p. The rewrite control circuit #1 rewrites, using register rewriteinformation SET_REG_1 supplied from the arbiter 61′, the protected areainformation of the protected area configuration registers #1_1 to #1_pcorresponding to the access evaluation circuit with the lowest addresshit rate among the access evaluation circuits #1_1 to #1_p.

Note that the configuration of the local MPU #2 (72) included in the MPUcontrol unit #2 (23′) is the same as that of the local MPU #1 (71)included in the above-mentioned MPU control unit #1 (13′), thus therepeated explanation shall not be provided here. Additionally, in FIG.7, both the number of the protected area configuration registers #1_1 to#1_p and the access evaluation circuits #1_1 to #1_p that are includedin the local MPU #1 (71) and the number of protected area configurationregisters #2_1 to #2_p and access evaluation circuits #2_1 to #2_p thatare included in the local MPU #2 (72) shall be p. However, in thisembodiment, the number of the protected area configuration registers#1_1 to #1_p and the access evaluation circuits #1_1 to #1_p that areincluded in the local MPU #1 (71) may be different from the number ofthe protected area configuration registers #2_1 to #2_p and the accessevaluation circuits #2_1 to #2_p that are included in the local MPU #2(72).

When the memory address ADD_M_n did not result in a hit in the localMPUs 71 and 72, the memory protection unit MPU #0 (60′) evaluateswhether or not the memory address ADD_M_n is included in the memory areastored to the protected area configuration registers #1 to #m that areincluded in the memory protection unit MPU #0 (60′).

When there is conflict between the memory address ADD_M_1 output fromthe evaluation signal generation circuit #1 of the local MPU #1 (71) andthe memory address ADD_M_2 output from the evaluation signal generationcircuit #2 of the local MPU #2 (72), the arbiter 61′ included in thememory protection unit MPU #0 (60′) arbitrates the memory addressADD_M_1 and the memory address ADD_M_2. That is, the arbiter 61′ outputsthe memory address ADD_M_1 or the memory address ADD_M_2 to the areaevaluation circuits #1 to #m.

The protected area configuration registers #1 to #m store the protectedarea information relating to the protected areas of the shared memory32. That is, the protected area configuration registers #1 to #m storeaddress information corresponding to memory areas of the shared memory32 and authority information relating to authority of each core toaccess the memory areas of the shared memory 32. Note that the protectedarea configuration registers #1_1 to #1_m have the same configuration asthe protected area configuration registers #1 to #m (see FIG. 4)explained in the second embodiment, thus the repeated explanation shallnot be provided here.

The area evaluation circuits #1 to #m are provided to correspond to theprotected area configuration registers #1 to #m, respectively. In otherwords, the protected area configuration registers #1 to #m and the areaevaluation circuits #1 to #m are provided to correspond to the entries#1 to #m, respectively. The area evaluation circuits #1 to #m evaluatewhether or not the memory address ADD_M_n is included in the memoryareas stored to the protected area configuration registers #1 to #mbased on the memory address ADD_M_n and the protected area informationstored to the protected area configuration registers #1 to #m.

For example, when the memory address ADD_M_1 is included in the memoryarea #1 stored to the protected area configuration register #1, i.e.,when the memory address ADD_M_1 is within the range between the upperlimit address register (MPUA1) and the lower limit address register(MPLA1), the area evaluation circuit #1 evaluates that the memoryaddress ADD_M_1 is included in the protected area of the entry #1.

The evaluation signal generation circuit #0 generates an evaluationsignal HIT_n based on evaluation results output from the area evaluationcircuits #1 to #m and outputs the generated evaluation signal HIT_n andthe register rewrite information SET_REG_n to the arbiter 61′.Specifically, when any of the area evaluation circuits #1 to #mevaluates that the memory address ADD_M_n is included in the memoryareas that are stored to the protected area configuration registers #1to #m, the evaluation signal generation circuit #0 outputs, to thearbiter 61′, the evaluation signal HIT_n indicating a hit of the memoryaddress ADD_M_n. At this time, the evaluation signal generation circuit#0 outputs, to the arbiter 61′, the protected area informationcorresponding to the memory address ADD_M_n that resulted in a hit(i.e., information stored to the protected area configuration registers#1 to #m) as the register rewrite information SET_REG_n.

For example, when the arbiter 61′ selects the memory address ADD_M_1,the arbiter 61′ outputs an evaluation signal HIT_1 to the local MPU #1(71). Moreover, the arbiter 61′ outputs the register rewrite informationSET_REG_1 to the rewrite control circuit #1. When the register rewriteinformation SET_REG_1 is supplied, the rewrite control circuit #1rewrites, using the register rewrite information SET_REG_1 supplied fromthe arbiter 61′, the protected area information of the protected areaconfiguration registers #1_1 to #1_p corresponding to the accessevaluation circuit with the lowest address hit rate among the accessevaluation circuits #1_1 to #1_p.

Next, an operation of the information processing apparatus according tothis embodiment is explained using flowcharts shown in FIGS. 8 and 9.Explained below is the case in which the CPU #1 included in the core #1(10) accesses the shared memory 32 as an example.

When the CPU #1 accesses the shared memory 32, the CPU #1 outputs thememory access information ACC_M_1 to the local MPU #1 (71) (Step S21).That is, the memory access information ACC_M_1 output from the CPU #1 istemporarily held to the address register #1 and also supplied to thelocal MPU #1 (71). The local MPU #1 (71) performs access evaluationbased on the memory access information ACC_M_1 (Step S22).

When any of the access evaluation circuits #1_1 to #1_p evaluates thatthe memory address included in the memory access information ACC_M_1 isincluded in the memory areas stored to the protected area configurationregisters #1_1 to #1_p (i.e., when the memory address ADD_M_1 results ina hit), it is evaluated that access evaluation can be performed by thelocal MPU #1 (71) (Step S23: Yes). When the memory address ADD_M_1results in a hit and the core #1 (10) is evaluated to have accessauthority to the memory area 32 (Step S24: Yes), the evaluation signalgeneration circuit #1 outputs the evaluation signal OUT_M_1 indicatingaccess allowed to the MPU control unit #1 (13′). In this case, the MPUcontrol unit #1 (13′) outputs the access allowed notification signal tothe CPU #1 as the notification signal ACK_1. After that, the CPU #1accesses the shared memory 32 (Step S25).

On the other hand, when the memory address ADD_M_1 results in a hit butthe core #1 (10) has no access authority to the memory area 32, theaccess is evaluated as prohibited (Step S24: No). When overlapping ofthe memory areas is allowed for each of the entries #1_1 to #1_p (StepS26: Yes), the process proceeds to the flowchart of FIG. 9. That is,when overlapping of the memory areas is allowed for each of the entries#1_1 to #1_p, it is necessary to perform access evaluation on otherentries of the memory protection unit MPU #0 (60′). Meanwhile, whenoverlapping of the memory areas is not allowed for each of the entries#1_1 to #1_p (Step S26: No), the evaluation signal OUT_M_1 indicatingaccess prohibited is output to the MPU control unit #1 (13′). Then, theMPU control unit #1 (13′) outputs the exception notification signal tothe CPU #1 as the notification signal ACK_1. In this case, access to theshared memory 32 by the CPU #1 is prohibited (Step S27).

Moreover, when the local MPU #1 (71) is unable to perform accessevaluation (Step S23: No), i.e., when the memory address ADD_M_1 did notresult in a hit, the evaluation signal generation circuit #1 outputs thememory address ADD_M_1 to the arbiter 61′ (Step S31 of FIG. 9). The casein which the memory address ADD_M_1 did not result in a hit is the casein which all the access evaluation circuits #1_1 to #1_p evaluate thatthe memory address ADD_M_1 included in the memory access informationACC_M_1 is not included in the memory areas stored to the protected areaconfiguration registers #1_1 to #1_p.

As shown in the flowchart of FIG. 9, when the evaluation signalgeneration circuit #1 outputs the memory address ADD_M_1 to the arbiter61′ (Step S31), after the arbiter 61′ arbitrates the memory addressADD_M_1 and the memory address ADD_M_2, the arbiter 61′ outputs thememory address ADD_M_1 to the area evaluation circuits #1 to #m. Afterthat, the area evaluation circuits #1 to #m evaluate whether or not thememory address ADD_M_1 is included in the entries #1 to #m (Step S33).In other words, the area evaluation circuits #1 to #m evaluate whetheror not the memory address ADD_M_1 is included in the memory areas storedto the protected area configuration registers #1 to #m (i.e., the areaevaluation circuits #1 to #m evaluate whether or not the memory addressADD_M_1 results in a hit).

When all of the area evaluation circuits #1 to #m evaluate that thememory address ADD_M_1 is not included in the entries #1 to #m (StepS34: No), the evaluation signal generation circuit #0 outputs, to theMPU control unit #1 (13′) via the arbiter 61′, the evaluation signalHIT_1 that notifies a miss. When the evaluation signal HIT_1 thatnotifies amiss is supplied from the arbiter 61′, the MPU control unit #1(13′) outputs the exception notification signal to the CPU #1 as thenotification signal ACK_1 (Step S36). In this case, access to the sharedmemory 32 by the CPU #1 is prohibited.

Meanwhile, when the area evaluation circuits #1 to #m evaluate that thememory address ADD_M_1 is included in the entries #1 to #m (Step S34:Yes), the evaluation signal generation circuit #0 outputs, to the localMPU #1 (71) via the arbiter 61′, the evaluation signal HIT_1 indicatinga hit of the memory address ADD_M_1. At this time, the evaluation signalgeneration circuit #0 outputs, to the rewrite control circuit #1 via thearbiter 61′, the protected area information corresponding to the memoryaddress ADD_M_1 that resulted in a hit as the register rewriteinformation SET_REG_n. The rewrite control circuit #1 rewrites, usingthe register rewrite information SET_REG_1, the protected areainformation of the protected area configuration registers #1_1 to #1_pcorresponding to the access evaluation circuit with the lowest addresshit rate among the access evaluation circuits #1_1 to #1_p (Step S35).

After rewriting of the protected area configuration register, the localMPU #1 (71) performs access evaluation again based on the memory accessinformation ACC_M_1 (Step S37). At this time, the memory accessinformation ACC_M_1 is supplied from the address register #1. After theaccess evaluation, the evaluation signal generation circuit #1 outputsthe evaluation signal OUT_M_1 to the MPU control unit #1 (13′). When theevaluation signal OUT_M_1 indicates that the access is allowed (StepS38: Yes), the MPU control unit #1 (13′) outputs the access allowednotification signal to the CPU #1 as the notification signal ACK_1.After that, the CPU #1 accesses the shared memory 32 (Step S39). On theother hand, when the evaluation signal OUT_M_1 indicates that the accessis prohibited (Step S38: No), the MPU control unit #1 (13′) outputs theexception notification signal to the CPU #1 as the notification signalACK_1 (Step S40). In this case, access to the shared memory 32 by theCPU #1 is prohibited.

As explained above, in the information processing apparatus according tothis embodiment, the local MPU #1 (71) is provided in the core #1 (10),and the local MPU #2 (72) is provided in the core #2 (20). Further,prior to evaluation by the shared memory protection unit MPU #0 (60′),the local MPUs 71 and 72 each evaluate whether or not the correspondingcore 10 and 20 is allowed to access the shared memory 32. At this time,the local MPUs 71 and 72 preferentially store the protected areainformation (information relating to the protected areas of the sharedmemory 32) corresponding to the entries with high address hit rates.

Therefore, prior to the evaluation by the shared memory protection unitMPU #0 (60′), the local MPUs 71 and 72 with a high address hit rate canperform access evaluation on the cores 10 and 20 to the shared memory32, thereby increasing the processing speed of the informationprocessing apparatus.

At this time, the number of the memory areas stored to the protectedarea configuration registers #1_1 to #1_p in the local MPU #1 (71) andthe protected area configuration registers #2_1 to #2_p of the local MPU#2 (72) is less than the number of memory areas stored to the protectedarea configuration registers #1 to #m in the memory protection unit MPU#0 (60′). In other words, the number of entries m of the memoryprotection unit MPU #0 (60′) is less than the number of entries p of thelocal MPUs 71 and 72 (p<m).

That is, access to the shared memory 32 by the cores 10 and 20 tends tobecome a timing critical path, thus the number of entries of the localMPUs 71 and 72 can be less than the number of entries of the memoryprotection unit MPU #0 (60′). Accordingly, the processing speed can beincreased while reducing the power consumption of the informationprocessing apparatus by previously performing access evaluation by thelocal MPUs 71 and 72 with a high address hit rate.

The memory protection unit is provided, for example, for preventingresources from being destroyed due to unexpected program behavior andfor preventing a user program from performing unauthorized execution anddata operation. A memory protection unit with less number of entries canbe used for the memory areas that are usually accessed, thus whileexecuting a normal program, there will be a small number of mistakes inaccess evaluation by the local MPUs 71 and 72.

Meanwhile, in access that could cause violation of memory protection,there can be a mistake in access evaluation by the local MPUs 71 and 72.In this case, although evaluation by the shared memory protection unitMPU #0 (60′) is required, evaluation by the memory protection unit MPU#0 (60′) takes only a short time, for example for one to two clocks,thus the influence is almost negligible.

Note that in normal access, when the address hit rate of the local MPUs71 and 72 is 99.9% and when overhead in case there is a mistake in thelocal MPUs 71 and 72 is one clock, overhead of the number of clocks bythe local MPUs 71 and 72 is (0.999×1+0.001×2)=1.001, which accounts for0.1% of performance degradation.

Fourth Embodiment

Next, a fourth embodiment is explained. FIG. 10 is a block diagramshowing an MPU control unit #1 (13″), an MPU control unit #2 (23″), anda memory protection unit MPU #0 (60″) that are included in aninformation processing apparatus according to this embodiment. Adifference of this embodiment from the information processing apparatusexplained in the third embodiment is that when a memory address did notresult in a hit in local MPUs 81 and 82, the memory protection unit MPU#0 (60″) performs access evaluation. Other configuration is the same asthe information processing apparatus explained in the third embodiment.

As shown in FIG. 10, the MPU control unit #1 (13″) includes the localMPU #1 (81). The local MPU #1 (81) includes protected area configurationregisters #1_1 to #1_p and access evaluation circuits #1_1 to #1_p, anevaluation signal generation circuit #1, and a rewrite control circuit#1. Here, p is an integer of 1≦p<m.

The protected area configuration registers #1_1 to #1_p store protectedarea information relating to protected areas of the shared memory 32.That is, the protected area configuration registers #1 to #m storeaddress information corresponding to memory areas of the shared memory32 and authority information relating to authority of the core #1 (10)to access the memory areas of the shared memory 32. Note that theprotected area configuration registers #1_1 to #1_p have the sameconfiguration as the protected area configuration registers #1 to #m(see FIG. 4) explained in the second embodiment, thus the repeatedexplanation shall not be provided here.

The access evaluation circuits #1_1 to #1_p are provided to correspondto the protected area configuration registers #1_1 to #1_p,respectively. In other words, the protected area configuration registers#1_1 to #1_p and the access evaluation circuit #1_1 to #1_p are providedto correspond to entries #1_1 to #1_p, respectively. The accessevaluation circuits #1_1 to #1_p evaluate whether or not the core #1(10) is allowed to access the shared memory 32 based on the memoryaccess information ACC_M_1, which is output from the core #1 (10), andthe protected area information, which is stored to the protected areaconfiguration registers #1_1 to #1_p.

That is, when a memory address included in the memory access informationACC_M_1 is included in the memory areas stored to the protected areaconfiguration registers #1_1 to #1_p, and further, when the core #1 (10)has access authority to the memory area 32, the access evaluationcircuits #1_1 to #1_p evaluate that the core #1 (10) is allowed toaccess the shared memory 32.

The evaluation signal generation circuit #1 outputs an evaluation signalOUT_M_1 to the MPU control unit #1 (13″) or the memory address ADD_M_1to an arbiter 61″.

That is, when the memory address ADD_M_1 results in a hit, and further,the core #1 (10) is evaluated to have access authority to the memoryarea 32, the evaluation signal generation circuit #1 generates theevaluation signal OUT_M_1 indicating access allowed and outputs thegenerated evaluation signal OUT_M_1 to the MPU control unit #1 (13″).The case in which the memory address ADD_M_1 results in a hit is thecase in which any of the access evaluation circuits #1_1 to #1_pevaluates that the memory address ADD_M_1 included in the memory accessinformation ACC_M_1 is included in the memory areas stored to theprotected area configuration registers #1_1 to #1_p.

Meanwhile, when the memory address ADD_M_1 results in a hit, andfurther, the core #1 (10) is evaluated to have no access authority tothe memory area 32, the evaluation signal generation circuit #1generates the evaluation signal OUT_M_1 indicating access prohibited andoutputs the generated evaluation signal OUT_M_1 to the MPU control unit#1 (13″). Note that when overlapping of the memory areas is allowed forthe entries #1_1 to #1_p, it is necessary to perform access evaluationon other entries of the memory protection unit MPU #0 (60″). Thus, theevaluation signal generation circuit #1 will not output the evaluationsignal OUT_M_1 to the MPU control unit #1 (13″) and outputs the memoryaccess information ACC_M_1 to the arbiter 61″.

On the other hand, when the memory address ADD_M_1 did not result in ahit, the evaluation signal generation circuit #1 outputs the memoryaccess information ACC_M_1 to the arbiter 61″. The case in which thememory address ADD_M_1 did not result in a hit is the case in which allthe access evaluation circuits #1_1 to #1_p evaluate that the memoryaddress ADD_M_1 included in the memory access information ACC_M_1 is notincluded in the memory areas stored to the protected area configurationregisters #1_1 to #1_p.

The rewrite control circuit #1 calculates an address hit rate of eachaccess evaluation circuits #1_1 to #1_p based on evaluation resultsoutput from the access evaluation circuit #1_1 to #1_p. Here, theaddress hit rate is a probability that the memory address ADD_M_1included in the memory access information ACC_M_1 is included in thememory areas stored to the protected area configuration registers #1_1to #1_p. The rewrite control circuit #1 rewrites, using register rewriteinformation SET_REG_1 supplied from the arbiter 61″, the protected areainformation of the protected area configuration registers #1_1 to #1_pcorresponding to the access evaluation circuit with the lowest addresshit rate among the access evaluation circuits #1_1 to #1_p.

Note that the configuration of the local MPU #2 (82) included in the MPUcontrol unit #2 (23″) is the same as that of the local MPU #1 (81)included in the above-mentioned MPU control unit #1 (13″), thus therepeated explanation shall not be provided here.

When the memory address ADD_M_n did not result in a hit in the localMPUs 81 and 82, the memory protection unit MPU #0 (60″) performs accessevaluation based on the memory access information ACC_M_n.

When there is conflict between the memory access information ACC_M_1output from the evaluation signal generation circuit #1 of the local MPU#1 (81) and the memory access information ACC_M_2 output from theevaluation signal generation circuit #1 of the local MPU #2 (82), thearbiter 61″ included in the memory protection unit MPU #0 (60″)arbitrates the memory access information ACC_M_1 and the memory accessinformation ACC_M_2. That is, the arbiter 61″ outputs the memory accessinformation ACC_M_1 or the memory access information ACC_M_2 to theaccess evaluation circuits#1 to #m.

The protected area configuration registers #1 to #m store protected areainformation relating to protected areas of the shared memory 32. Thatis, the protected area configuration registers #1 to #m store addressinformation corresponding to memory areas of the shared memory 32 andauthority information relating to authority of each core to access thememory areas of the shared memory 32. Note that the protected areaconfiguration registers #1_1 to #1_p have the same configuration as theprotected area configuration registers #1 to #m (see FIG. 4) explainedin the second embodiment, thus the repeated explanation shall not beprovided here.

The area evaluation circuits #1 to #m are provided to correspond to theprotected area configuration registers #1 to #m, respectively. In otherwords, the protected area configuration registers #1 to #m and the areaevaluation circuits #1 to #m are provided to correspond to the entries#1 to #m, respectively. The access evaluation circuits #1 to #m evaluatewhether or not the core #1 (10) and the core #2 (20) are allowed toaccess the shared memory 32 based on the memory access informationACC_M_n and the protected area information that is stored to theprotected area configuration registers #1 to #m.

That is, when a memory address included in the memory access informationACC_M_n is included in the memory areas stored to the protected areaconfiguration registers #1 to #m, and further, when the core #1 (10) andthe core #2 (20) have access authority to the memory area 32, the accessevaluation circuits #1 to #m evaluate that the core #1 (10) and the core#2 (20) are allowed to access the shared memory 32.

For example, when a memory address included in the memory accessinformation ACC_M_1 is included in the memory area #1 stored to theprotected area configuration register #1, i.e., when the memory addressis within the range between the upper limit address register (MPUA1) andthe lower limit address register (MPLA1), the area evaluation circuit #1evaluates that the memory address ADD_M_1 is included in the entry #1.Further, when a type of access to the shared memory 32 (i.e., write,read, execute etc.) by the core #1 (10) is allowed, the accessevaluation circuit #1 allows the core #1 (10) to access the sharedmemory 32. Here, the case in which a type of access is allowed is thecase in which a type of access to the shared memory 32 by the core #1(10) is allowed in the attribute register (MPAT1).

The evaluation signal generation circuit #0 generates an evaluationsignal OUT_n based on an evaluation result output from the accessevaluation circuits #1 to #m and outputs the generated evaluation signalOUT_n to the arbiter 61″. That is, when any of the access evaluationcircuits #1 to #m evaluates that access to the shared memory 32 isallowed, the evaluation signal generation circuit #0 generates theevaluation signal OUT_n indicating access allowed to the shared memory32 and outputs the generated evaluation signal OUT_n to the arbiter 61″.On the other hand, when all of the access evaluation circuits #1 to #mevaluate that access to the shared memory 32 is prohibited, theevaluation signal generation circuit #0 generates the evaluation signalOUT_n indicating access prohibited to the shared memory 32 and outputsthe generated evaluation signal OUT_n to the arbiter 61″.

At this time, the evaluation signal generation circuit #0 outputs, tothe arbiter 61″, the protected area information corresponding to thememory address ADD_M_n that resulted in a hit (i.e., information storedto the protected area configuration registers #1 to #m) as the registerrewrite information SET_REG_n. Note that when the memory areas of theentries #1 to #m are configured to overlap with each other, a pluralityof the access evaluation circuits #1 to #m may evaluate that access isallowed.

For example, when the arbiter 61″ selects the memory address ADD_M_1,the arbiter 61″ outputs the evaluation signal OUT_1 to the local MPU #1(71). Moreover, the arbiter 61″ outputs the register rewrite informationSET_REG_1 to the rewrite control circuit #1. When the register rewriteinformation SET_REG_1 is supplied, the rewrite control circuit #1rewrites, using the register rewrite information SET_REG_1 supplied fromthe arbiter 61″, the protected area information of the protected areaconfiguration registers #1_1 to #1_p corresponding to the accessevaluation circuit with the lowest address hit rate among the accessevaluation circuits #1_1 to #1_p.

Next, an operation of the information processing apparatus according tothis embodiment is explained using flowcharts shown in FIGS. 11 and 12.Explained below is the case in which the CPU #1 included in the core #1(10) accesses the shared memory 32 as an example.

When the CPU #1 accesses the shared memory 32, the CPU #1 outputs thememory access information ACC_M_1 to the local MPU #1 (81) (Step S51).The local MPU #1 (81) performs access evaluation based on the memoryaccess information ACC_M_1 (Step S52).

When any of the access evaluation circuits #1_1 to #1_p evaluates thatthe memory address included in the memory access information ACC_M_1 isincluded in the memory areas stored to the protected area configurationregisters #1_1 to #1_p (i.e., when the memory address ADD_M_1 results ina hit), it is evaluated that access evaluation can be performed by thelocal MPU #1 (81) (Step S53: Yes). When the memory address ADD_M_1results in a hit and the core #1 (10) is evaluated to have accessauthority to the memory area 32 (Step S54: Yes), the evaluation signalgeneration circuit #1 outputs the evaluation signal OUT_M_1 indicatingaccess allowed to the MPU control unit #1 (13″). In this case, the MPUcontrol unit #1 (13″) outputs the access allowed notification signal tothe CPU #1 as the notification signal ACK_1. After that, the CPU #1accesses the shared memory 32 (Step S55).

On the other hand, when the memory address ADD_M_1 results in a hit butthe core #1 (10) has no access authority to the memory area 32, theaccess is evaluated as prohibited (Step S54: No). When overlapping ofthe memory areas is allowed for each of the entries #1_1 to #1_p (StepS56: Yes), the process proceeds to the flowchart of FIG. 12. That is,when overlapping of the memory areas is allowed for each of the entries#1_1 to #1_p, it is necessary to perform access evaluation on otherentries of the memory protection unit MPU #0 (60″). Meanwhile, whenoverlapping of the memory areas is not allowed for each of the entries#1_1 to #1_p (Step S56: No), the evaluation signal OUT_M_1 indicatingaccess prohibited is output to the MPU control unit #1 (13″). Then, theMPU control unit #1 (13″) outputs the exception notification signal tothe CPU #1 as the notification signal ACK_1. In this case, access to theshared memory 32 by the CPU #1 is prohibited (Step S57).

Moreover, when the local MPU #1 (81) is unable to perform accessevaluation (Step S53: No), i.e., when the memory address ADD_M_1 did notresult in a hit, the evaluation signal generation circuit #1 outputs thememory access information ACC_M_1 to the arbiter 61″ (Step S61 of FIG.12). The case in which the memory address ADD_M_1 did not result in ahit is the case in which all the access evaluation circuits #1_1 to #1_pevaluate that the memory address ADD_M_1 included in the memory accessinformation ACC_M_1 is not included in the memory areas stored to theprotected area configuration registers #1_1 to #1_p.

As shown in the flowchart of FIG. 12, when the evaluation signalgeneration circuit #1 outputs the memory access information ACC_M_1 tothe arbiter 61″ (Step S61), after the arbiter 61″ arbitrates the memoryaccess information ACC_M_1 and the memory access information ACC_M_2,the arbiter 61″ outputs the memory access information ACC_M_1 to thearea evaluation circuits #1 to #m (Step S62).

After that, the access evaluation circuits #1 to #m perform accessevaluation based on the protected area configuration registers #1 to #mand the memory access information ACC_M_1 (Step S63). That is, theaccess evaluation circuits #1 to #m evaluate whether or not the memoryaddress ADD_M_1 included in the memory access information ACC_M_1 isincluded in the respective entries #1 to #m (i.e., the memory areas #1to #m that are stored to the protected area configuration registers #1to #m). Then, when the memory address ADD_M_1 is not included in theentries #1 to #m (Step S64: No), the access evaluation circuits #1 to #moutput evaluation results indicating that access is prohibited. At thistime, the evaluation signal generation circuit #0 generates theevaluation signal OUT_1 indicating access prohibited and outputs theevaluation signal OUT_1 to the arbiter 61″ (Step S66).

Meanwhile, when the memory address ADD_M_1 is included in the entries #1to #m (Step S64: Yes), and further, when a type of access (e.g., read,write, execute) to the shared memory 32 by the CPU #1 is allowed (StepS65: Yes), the access evaluation circuits #1 to #m output evaluationresults indicating that the access is allowed. At this time, theevaluation signal generation circuit #0 generates the evaluation signalOUT_1 indicating access allowed and outputs the generated evaluationsignal OUT_1 to the arbiter 61″ (Step S67). Here, the case in which atype of access to the shared memory 32 by the CPU #1 is allowed is thecase in which a type of access to the shared memory 32 by the CPU #1 isallowed in the attribute registers of the protected area configurationregisters #1 to #m, for example. Still further, the evaluation signalgeneration circuit #0 outputs, to the rewrite control circuit #1 via thearbiter 61″, the protected area information corresponding to the memoryaddress ADD_M_1 that resulted in a hit as the register rewriteinformation SET_REG_1.

Alternatively, when the memory address ADD_M_1 is included in theentries #1 to #m (Step S64: Yes), and further, when a type of access tothe shared memory 32 by the CPU #1 is not allowed (Step S65: No), theaccess evaluation circuits #1 to #m output evaluation results indicatingthat the access is prohibited. At this time, the evaluation signalgeneration circuit #0 generates the evaluation signal OUT_1 indicatingaccess prohibited and outputs the generated evaluation signal OUT_1 tothe arbiter 61″ (Step S68). Furthermore, the evaluation signalgeneration circuit #0 outputs, to the rewrite control circuit #1 viaarbiter 61″, protected area information corresponding to the memoryaddress ADD_M_1 that resulted in a hit as the register rewriteinformation SET_REG_1.

In response to the register rewrite information SET_REG_1 (Steps S67 andS68), the rewrite control circuit #1 rewrites, using the registerrewrite information SET_REG_1, the protected area information of theprotected area configuration registers #1_1 to #1_p corresponding to theaccess evaluation circuit with the lowest address hit rate among theaccess evaluation circuits #1_1 to #1_p.

Moreover, the arbiter 61″ outputs the evaluation signal OUT_1 to the MPUcontrol unit #1 (13″). Then, when the evaluation signal OUT_1 indicatesthat the access is allowed (Step S70: Yes), the MPU control unit #1(13″) outputs the access allowed notification signal to the CPU #1 asthe notification signal ACK_1. After that, the CPU #1 accesses theshared memory 32 (Step S71). On the other hand, when the evaluationsignal OUT_1 indicates that the access is prohibited (Step S70: No), theMPU control unit #1 (13″) outputs the exception notification signal tothe CPU #1 as the notification signal ACK_1 (Step S72). In this case,access to the shared memory 32 by CPU #1 is prohibited.

As explained above, in a similar manner to the information processingapparatus explained in the third embodiment, the information processingapparatus according to this embodiment can increase the processing speedwhile reducing power consumption of the information processingapparatus.

Note that although the information processing apparatus including twocores is explained so far, the information processing apparatusexplained in each of the embodiments may include three or more cores.

Moreover, the first embodiment explained an example in which theinformation processing apparatus includes the shared register #0 (50)and the memory protection unit MPU #0 (60) as the shared resource #0(30) as an example. However, the information processing apparatusaccording to the first embodiment may be configured to include only theshared register #0 (50) (i.e., the memory protection unit MPU #0 (60)may not be included). Meanwhile, the information processing apparatusaccording to the second to fourth embodiments may include at least thememory protection unit MPU #0 (60) as the shared resource #0 (30) and itis not necessary to include the shared register #0 (50).

The first to fourth embodiments can be combined as desirable by one ofordinary skill in the art.

While the invention has been described in terms of several embodiments,those skilled in the art will recognize that the invention can bepracticed with various modifications within the spirit and scope of theappended claims and the invention is not limited to the examplesdescribed above.

Further, the scope of the claims is not limited by the embodimentsdescribed above.

Furthermore, it is noted that, Applicant's intent is to encompassequivalents of all claim elements, even if amended later duringprosecution.

What is claimed is:
 1. An information processing method using aninformation processing apparatus, wherein the information processingapparatus comprises: a plurality of cores; a shared resource that can beshared by the plurality of cores; and a local register that storesconfiguration information peculiar to each of the plurality of cores,the shared resource is provided independently of the plurality of cores,the local register is provided in each of the plurality of cores, theshared resource comprises a memory protection circuit that protects ashared memory from invalid access by each of the plurality of cores,each of the plurality of cores comprises a local memory protectioncircuit that evaluates whether or not the corresponding core can accessthe shared memory prior to evaluation by the memory protection circuit,each of the local memory protection circuit comprises: a secondprotected area configuration register storing protected area informationrelating to a protected area of the shared memory; a second accessevaluation circuit provided to correspond to the second protected areaconfiguration register; and a rewrite control circuit that rewrites theprotected area information stored in the second protected areaconfiguration register, the memory protection circuit comprises: a firstprotected area configuration register storing the protected areainformation relating to the protected area of the shared memory; and afirst access evaluation circuit that evaluates whether or not the coreis allowed to access the shared memory, and the information processingmethod comprises: referring, in each of the local memory protectioncircuits, by the second access evaluation circuit, to the secondprotected area configuration register and evaluating whether or not eachof the plurality of cores is allowed to access the shared memory basedon the memory access information and the protected area information;evaluating, in the memory protection circuit, when the memory addressincluded in the memory access information is not included in the memoryarea stored in the second protected area configuration register, by thefirst access evaluation circuit, whether or not the core is allowed toaccess the shared memory; and rewriting, by a rewrite control circuit,protected area information stored in the second protected areaconfiguration register by using protected area information relating to aprotected area of the shared memory stored in the first protected areaconfiguration register included in the memory protection circuit.
 2. Theinformation processing method according to claim 1, wherein the numberof memory areas stored in the second protected area configurationregister is less than the number of memory areas stored in the firstprotected area configuration register.
 3. The information processingmethod according to claim 1, wherein an address hit rate of each of thesecond access evaluation circuit is calculated based on an evaluationresult output from the second access evaluation circuit and protectedarea information stored in the second protected area configurationregister corresponding to the access evaluation circuit with the lowestaddress hit rate is rewritten by using protected area information storedin the first protected area configuration register.
 4. The informationprocessing method according to claim 1, wherein the first protected areaconfiguration register stores address information corresponding to amemory area of the shared memory and authority information relating toauthority of each of the plurality of cores to access the memory area,and when a memory address included in the memory access information isincluded in the memory area stored in the first protected areaconfiguration register, and further, when the core has access authorityto the memory area, it is evaluated that the core can access the sharedmemory.
 5. The information processing method according to claim 1,wherein the first protected area configuration register stores addressinformation corresponding to a memory area of the shared memory andauthority information relating to authority of each of the plurality ofcores to access the memory area, and when a memory address included inthe memory access information is not included in the memory area storedin the first protected area configuration register, and further, whenthe core has access authority to the memory area, the memory protectioncircuit evaluates that the core cannot access the shared memory.
 6. Aninformation processing method using an information processing apparatus,wherein the information processing apparatus comprises: a plurality ofcores; a shared resource that can be shared by the plurality of cores;and a local register that stores configuration information peculiar toeach of the plurality of cores, the shared resource is providedindependently of the plurality of cores, the local register is providedin each of the plurality of cores, the shared resource comprises amemory protection circuit that protects a shared memory from invalidaccess by each of the plurality of cores, each of the plurality of corescomprises a local memory protection circuit that evaluates whether ornot the corresponding core can access the shared memory prior toevaluation by the memory protection circuit, each of the local memoryprotection circuit comprises: a second protected area configurationregister storing protected area information relating to a protected areaof the shared memory; a second access evaluation circuit provided tocorrespond to the second protected area configuration register; and arewrite control circuit that rewrites the protected area informationstored in the second protected area configuration register, the memoryprotection circuit comprises: a first protected area configurationregister storing the protected area information relating to theprotected area of the shared memory; and an area evaluation circuit thatevaluates whether or not the memory address included in the memoryaccess information is included in the memory area stored to the firstprotected area configuration register, and the information processingmethod comprises: referring, in each of the local memory protectioncircuits, by the second access evaluation circuit, to the secondprotected area configuration register and evaluating whether or not eachof the plurality of cores is allowed to access the shared memory basedon the memory access information and the protected area information;evaluating, in the memory protection circuit, when the memory addressincluded in the memory access information is not included in the memoryarea stored in the second protected area configuration register, by thearea evaluation circuit, whether or not the memory address is includedin the memory area stored in the first protected area configurationregister storing protected area information relating to a protected areaof the shared memory; rewriting, in the local memory protection circuit,when it is determined that the memory address is included in a memoryarea stored in the first protected area configuration register by thearea evaluation circuit, by the rewrite control circuit, protected areainformation stored in the second protected area configuration registerby using protected area information stored in the first protected areaconfiguration register; and evaluating again, after the second protectedarea configuration register is rewritten, by the second accessevaluation circuit, whether or not the core is allowed to access theshared memory based on the memory access information and rewrittenprotected area information stored in the second protected areaconfiguration register.
 7. The information processing method accordingto claim 6, wherein the number of memory areas stored in the secondprotected area configuration register is less than the number of memoryareas stored in the first protected area configuration register.
 8. Theinformation processing method according to claim 6, wherein an addresshit rate of each of the second access evaluation circuit is calculatedbased on an evaluation result output from the second access evaluationcircuit and protected area information stored in the second protectedarea configuration register corresponding to the access evaluationcircuit with the lowest address hit rate is rewritten by using protectedarea information stored in the first protected area configurationregister.
 9. The information processing method according to claim 6,wherein the first protected area configuration register stores addressinformation corresponding to a memory area of the shared memory andauthority information relating to authority of each of the plurality ofcores to access the memory area, and when a memory address included inthe memory access information is included in the memory area stored inthe first protected area configuration register, and further, when thecore has access authority to the memory area, the memory protectioncircuit evaluates that the core can access the shared memory.
 10. Theinformation processing method according to claim 6, wherein the firstprotected area configuration register stores address informationcorresponding to a memory area of the shared memory and authorityinformation relating to authority of each of the plurality of cores toaccess the memory area, and when a memory address included in the memoryaccess information is not included in the memory area stored in thefirst protected area configuration register, and further, when the corehas access authority to the memory area, the memory protection circuitevaluates that the core cannot access the shared memory.